<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>蜗牛瑜伽后台管理系统</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" href="images/browserLOGO2.png" type="image/x-icon" />
<link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/admin.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/app.js"></script>
</head>
<body>
	<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧！ <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验！</p><![endif]-->
</head>

<body>
	<!---------------------------->
	<!------------ 顶部  ------------>
	<!---------------------------->
	<%@include file="jsp/adminHeader.jsp" %>
	<!---------------------------->
	<!---------------------------->


	<div class="am-cf admin-main">

	<!--------------------------------->
	<!------------ 左侧导航栏部  ------------>
	<!---------------------------------->
	<%@include file="jsp/adminLeftNavi.jsp" %>
	<!---------------------------------->
	<!---------------------------------->

		<div class=" admin-content">
			<!----------------------------------->
			<!------------ 内容顶部导航栏  ------------>
			<!----------------------------------->
			<%@include file="jsp/adminInnerTitleNavi.jsp" %>
			<!----------------------------------->
			<!----------------------------------->

			<div class="admin">
					<div id="TeacherInfos">
						<div class="admin-index">
							<dl data-am-scrollspy="{animation: 'slide-right', delay: 100}">
								<dt class="qs">
									<i class="am-icon-users"></i>
								</dt>
								<dd><span id="maleStudent"></span>/<span id="femaleStudent"></span></dd>
								<dd class="f12">学员数：男/女</dd>
							</dl>
							<dl data-am-scrollspy="{animation: 'slide-right', delay: 300}">
								<dt class="cs">
									<i class="am-icon-shopping"><img src="assets/img/教练.png" style="margin-bottom: 20px"></i>
								</dt>
								<dd><span id="maleCoach"></span>/<span id="femaleCoach"></span></dd>
								<dd class="f12">教练数：男/女</dd>
							</dl>
							<dl data-am-scrollspy="{animation: 'slide-right', delay: 600}">
								<dt class="hs">
									<i class="am-icon-area-chart"></i>
								</dt>
								<dd><span id="finishOrder"></span></dd>
								<dd class="f12">交易达成数</dd>
							</dl>
							<dl data-am-scrollspy="{animation: 'slide-right', delay: 900}">
								<dt class="ls">
									<i class="am-icon-shopping"><img src="assets/img/房子.png" style="margin-bottom: 20px"></i>
								</dt>
								<dd><span id="countGym"></span></dd>
								<dd class="f12">场馆总数</dd>
							</dl>
						</div>
						
						<div class="admin-biaoge">
							<div class="xinxitj">信息概况</div>
							<table class="am-table">
								<thead>
									<tr>
										<th>类型</th>
										<th>注册数量</th>
									</tr>
								</thead>
								<tbody id="generalInfo">
									<tr>
										<td>学员</td>
										<td id="countStudent"></td>
									</tr>
									<tr>
										<td>教练</td>
										<td id="countCoach"></td>
									</tr>
									<tr>
										<td>场馆</td>
										<td id="countGym2"></td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="shuju">
							<div class="shujuone">
								<dl>
									<dt>教练总数：<span id="totalCoach"></span></dt>
									<dt>认证人数：<span id="authentic"></span></dt>
									<dt>未认证人数： <span id="unAauthentic"></span></dt>
								</dl>
								<ul>
									<h2><span id="authenticRate"></span>%</h2>
									<li>教练认证率</li>
								</ul>
							</div>
							<div class="shujutow">
								<dl>
									<dt>学员签约总数： <span id="totalOrder"></span></dt>
									<dt>签约完成数： <span id="finishOrder2"></span></dt>
								</dl>
								<ul>
									<h2><span id="orderRate"></span>%</h2>
									<li>签约达成率</li>
								</ul>
							</div>
							<script type="text/javascript">
								jQuery(".slideTxtBox").slide();
							</script>
						</div>
					</div>
				
				<!---------------------------->
				<!------------ 底部  ------------>
				<!---------------------------->
				<%@include file="jsp/adminCopyRight.jsp" %>
				<!---------------------------->
				<!---------------------------->
			</div>
		</div>
	</div>

	<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]-->

	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="assets/js/amazeui.min.js"></script>
	<!--<![endif]-->

<script type="text/javascript">
	$(function(){
		//showInfo();
		showNumInfo();
	});
	
	
	function showNumInfo(){
		$.ajax({
			url:"index_admin/showNum",
			type:"get",
			dataType:"json",
			success:function(data){
				$("#maleStudent").html(data.maleStudent);
				$("#femaleStudent").html(data.femaleStudent);
				$("#maleCoach").html(data.maleCoach);
				$("#femaleCoach").html(data.femaleCoach);
				$("#finishOrder").html(data.finishOrder);
				$("#countGym").html(data.gymNum);
				$("#countStudent").html(data.maleStudent+data.femaleStudent);
				$("#countCoach").html(data.maleCoach+data.femaleCoach);
				$("#countGym2").html(data.gymNum);
				$("#totalCoach").html(data.maleCoach+data.femaleCoach);
				$("#authentic").html(data.authenticCoach);
				$("#unAauthentic").html(data.maleCoach+data.femaleCoach-data.authenticCoach);
				if((data.maleCoach+data.femaleCoach)==0){
					$("#authenticRate").html(0);
				}else{
					$("#authenticRate").html(Math.ceil((data.authenticCoach)/(data.maleCoach+data.femaleCoach)*100));
				}
				$("#totalOrder").html(data.countOrder);
				$("#finishOrder2").html(data.finishOrder);
				if(data.countOrder==0){
					$("#orderRate").html(0);
				}else{
					$("#orderRate").html(Math.ceil(data.finishOrder/data.countOrder*100));
				}
			}
		});
	}
</script>

</body>
</html>